<template>
  <div class="imgItem">
    <img :src="item.picUrl + '?param=200y200'" alt="" />
                             <!-- 用过滤器 -->
    <div class="playCount">{{ item.playCount | formatCount }}</div>
  </div>
</template>

<script>
export default {
  name: "imgItem",
  props: {
    item: {
      type: Object,
      default: {},
    },
  },
  filters: {
    formatCount(val) {
      return (val / 10000).toFixed(1) + "万";
    },
  },
};
</script>

<style lang="scss" scoped>
.imgItem {
    position: relative;
  img {
    width: 100%;
    display: block;
  }
  .playCount {
    position: absolute;
    right: 5px;
    top: 2px;
    font-size: 12px;
    color: #fff;

    &::before{
        content: "";
        width: 11px;
        height: 10px;
        display: inline-block;
        margin-right: 2px;
        background: url();
    }
  }
}
</style>